﻿using System;
using System.Resources;
using System.Globalization;
using System.Reflection;

namespace mForum.Resources
{
    using mForum.Core.Infrastructure.Resource;

    public class ResourceManagerFactory : IResourceManagerFactory
    {
        private ResourceManager _resourceManager;

        public ResourceManagerFactory()
        {

        }

        public ResourceManager CreateResourceManager()
        {
            if (_resourceManager == null)
                _resourceManager = new ResourceManager("mForum.Resources.ErrorsAndExceptions.ErrorMessages", Assembly.GetExecutingAssembly());

            return _resourceManager;
        }
    }
}
